3.12.60 \(\int (3-x)^{3/2} (-2+x)^{3/2} \, dx\) [1160]

Optimal. Leaf size=91 \[ \frac {3}{64} \sqrt {3-x} \sqrt {-2+x}+\frac {1}{32} (3-x)^{3/2} \sqrt {-2+x}-\frac {1}{8} (3-x)^{5/2} \sqrt {-2+x}-\frac {1}{4} (3-x)^{5/2} (-2+x)^{3/2}-\frac {3}{128} \sin ^{-1}(5-2 x) \]

[Out]

-1/4*(3-x)^(5/2)*(-2+x)^(3/2)+3/128*arcsin(-5+2*x)+1/32*(3-x)^(3/2)*(-2+x)^(1/2)-1/8*(3-x)^(5/2)*(-2+x)^(1/2)+
3/64*(3-x)^(1/2)*(-2+x)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {52, 55, 633, 222} \begin {gather*} -\frac {1}{4} (x-2)^{3/2} (3-x)^{5/2}-\frac {1}{8} \sqrt {x-2} (3-x)^{5/2}+\frac {1}{32} \sqrt {x-2} (3-x)^{3/2}+\frac {3}{64} \sqrt {x-2} \sqrt {3-x}-\frac {3}{128} \sin ^{-1}(5-2 x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 - x)^(3/2)*(-2 + x)^(3/2),x]

[Out]

(3*Sqrt[3 - x]*Sqrt[-2 + x])/64 + ((3 - x)^(3/2)*Sqrt[-2 + x])/32 - ((3 - x)^(5/2)*Sqrt[-2 + x])/8 - ((3 - x)^
(5/2)*(-2 + x)^(3/2))/4 - (3*ArcSin[5 - 2*x])/128

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 55

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 633

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*(-4*(c/(b^2 - 4*a*c)))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps

\begin {align*} \int (3-x)^{3/2} (-2+x)^{3/2} \, dx &=-\frac {1}{4} (3-x)^{5/2} (-2+x)^{3/2}+\frac {3}{8} \int (3-x)^{3/2} \sqrt {-2+x} \, dx\\ &=-\frac {1}{8} (3-x)^{5/2} \sqrt {-2+x}-\frac {1}{4} (3-x)^{5/2} (-2+x)^{3/2}+\frac {1}{16} \int \frac {(3-x)^{3/2}}{\sqrt {-2+x}} \, dx\\ &=\frac {1}{32} (3-x)^{3/2} \sqrt {-2+x}-\frac {1}{8} (3-x)^{5/2} \sqrt {-2+x}-\frac {1}{4} (3-x)^{5/2} (-2+x)^{3/2}+\frac {3}{64} \int \frac {\sqrt {3-x}}{\sqrt {-2+x}} \, dx\\ &=\frac {3}{64} \sqrt {3-x} \sqrt {-2+x}+\frac {1}{32} (3-x)^{3/2} \sqrt {-2+x}-\frac {1}{8} (3-x)^{5/2} \sqrt {-2+x}-\frac {1}{4} (3-x)^{5/2} (-2+x)^{3/2}+\frac {3}{128} \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx\\ &=\frac {3}{64} \sqrt {3-x} \sqrt {-2+x}+\frac {1}{32} (3-x)^{3/2} \sqrt {-2+x}-\frac {1}{8} (3-x)^{5/2} \sqrt {-2+x}-\frac {1}{4} (3-x)^{5/2} (-2+x)^{3/2}+\frac {3}{128} \int \frac {1}{\sqrt {-6+5 x-x^2}} \, dx\\ &=\frac {3}{64} \sqrt {3-x} \sqrt {-2+x}+\frac {1}{32} (3-x)^{3/2} \sqrt {-2+x}-\frac {1}{8} (3-x)^{5/2} \sqrt {-2+x}-\frac {1}{4} (3-x)^{5/2} (-2+x)^{3/2}-\frac {3}{128} \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,5-2 x\right )\\ &=\frac {3}{64} \sqrt {3-x} \sqrt {-2+x}+\frac {1}{32} (3-x)^{3/2} \sqrt {-2+x}-\frac {1}{8} (3-x)^{5/2} \sqrt {-2+x}-\frac {1}{4} (3-x)^{5/2} (-2+x)^{3/2}-\frac {3}{128} \sin ^{-1}(5-2 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 82, normalized size = 0.90 \begin {gather*} -\frac {\sqrt {-6+5 x-x^2} \left (\sqrt {-2+x} \left (675-1095 x+650 x^2-168 x^3+16 x^4\right )+3 \sqrt {-3+x} \tanh ^{-1}\left (\frac {1}{\sqrt {\frac {-3+x}{-2+x}}}\right )\right )}{64 (-3+x) \sqrt {-2+x}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3 - x)^(3/2)*(-2 + x)^(3/2),x]

[Out]

-1/64*(Sqrt[-6 + 5*x - x^2]*(Sqrt[-2 + x]*(675 - 1095*x + 650*x^2 - 168*x^3 + 16*x^4) + 3*Sqrt[-3 + x]*ArcTanh
[1/Sqrt[(-3 + x)/(-2 + x)]]))/((-3 + x)*Sqrt[-2 + x])

________________________________________________________________________________________

Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 13.98, size = 144, normalized size = 1.58 \begin {gather*} \text {Piecewise}\left [\left \{\left \{\frac {I \left (-26 \left (-2+x\right )^{\frac {5}{2}}-16 \left (-2+x\right )^{\frac {9}{2}}-3 \text {ArcCosh}\left [\sqrt {-2+x}\right ] \sqrt {-3+x}-\left (-2+x\right )^{\frac {3}{2}}+3 \sqrt {-2+x}+40 \left (-2+x\right )^{\frac {7}{2}}\right )}{64 \sqrt {-3+x}},\text {Abs}\left [-2+x\right ]>1\right \}\right \},\frac {-5 \left (-2+x\right )^{\frac {7}{2}}}{8 \sqrt {3-x}}-\frac {3 \sqrt {-2+x}}{64 \sqrt {3-x}}+\frac {\left (-2+x\right )^{\frac {3}{2}}}{64 \sqrt {3-x}}+\frac {3 \text {ArcSin}\left [\sqrt {-2+x}\right ]}{64}+\frac {\left (-2+x\right )^{\frac {9}{2}}}{4 \sqrt {3-x}}+\frac {13 \left (-2+x\right )^{\frac {5}{2}}}{32 \sqrt {3-x}}\right ] \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[(3 - x)^(3/2)*(-2 + x)^(3/2),x]')

[Out]

Piecewise[{{I / 64 (-26 (-2 + x) ^ (5 / 2) - 16 (-2 + x) ^ (9 / 2) - 3 ArcCosh[Sqrt[-2 + x]] Sqrt[-3 + x] - (-
2 + x) ^ (3 / 2) + 3 Sqrt[-2 + x] + 40 (-2 + x) ^ (7 / 2)) / Sqrt[-3 + x], Abs[-2 + x] > 1}}, -5 (-2 + x) ^ (7
 / 2) / (8 Sqrt[3 - x]) - 3 Sqrt[-2 + x] / (64 Sqrt[3 - x]) + (-2 + x) ^ (3 / 2) / (64 Sqrt[3 - x]) + 3 ArcSin
[Sqrt[-2 + x]] / 64 + (-2 + x) ^ (9 / 2) / (4 Sqrt[3 - x]) + 13 (-2 + x) ^ (5 / 2) / (32 Sqrt[3 - x])]

________________________________________________________________________________________

Maple [A]
time = 0.16, size = 89, normalized size = 0.98

method result size
risch \(\frac {\left (16 x^{3}-120 x^{2}+290 x -225\right ) \left (-3+x \right ) \sqrt {-2+x}\, \sqrt {\left (-2+x \right ) \left (3-x \right )}}{64 \sqrt {-\left (-3+x \right ) \left (-2+x \right )}\, \sqrt {3-x}}+\frac {3 \sqrt {\left (-2+x \right ) \left (3-x \right )}\, \arcsin \left (2 x -5\right )}{128 \sqrt {-2+x}\, \sqrt {3-x}}\) \(86\)
default \(\frac {\left (3-x \right )^{\frac {3}{2}} \left (-2+x \right )^{\frac {5}{2}}}{4}+\frac {\sqrt {3-x}\, \left (-2+x \right )^{\frac {5}{2}}}{8}-\frac {\sqrt {3-x}\, \left (-2+x \right )^{\frac {3}{2}}}{32}-\frac {3 \sqrt {3-x}\, \sqrt {-2+x}}{64}+\frac {3 \sqrt {\left (-2+x \right ) \left (3-x \right )}\, \arcsin \left (2 x -5\right )}{128 \sqrt {-2+x}\, \sqrt {3-x}}\) \(89\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3-x)^(3/2)*(-2+x)^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/4*(3-x)^(3/2)*(-2+x)^(5/2)+1/8*(3-x)^(1/2)*(-2+x)^(5/2)-1/32*(3-x)^(1/2)*(-2+x)^(3/2)-3/64*(3-x)^(1/2)*(-2+x
)^(1/2)+3/128*((-2+x)*(3-x))^(1/2)/(-2+x)^(1/2)/(3-x)^(1/2)*arcsin(2*x-5)

________________________________________________________________________________________

Maxima [A]
time = 0.38, size = 67, normalized size = 0.74 \begin {gather*} \frac {1}{4} \, {\left (-x^{2} + 5 \, x - 6\right )}^{\frac {3}{2}} x - \frac {5}{8} \, {\left (-x^{2} + 5 \, x - 6\right )}^{\frac {3}{2}} + \frac {3}{32} \, \sqrt {-x^{2} + 5 \, x - 6} x - \frac {15}{64} \, \sqrt {-x^{2} + 5 \, x - 6} + \frac {3}{128} \, \arcsin \left (2 \, x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3-x)^(3/2)*(-2+x)^(3/2),x, algorithm="maxima")

[Out]

1/4*(-x^2 + 5*x - 6)^(3/2)*x - 5/8*(-x^2 + 5*x - 6)^(3/2) + 3/32*sqrt(-x^2 + 5*x - 6)*x - 15/64*sqrt(-x^2 + 5*
x - 6) + 3/128*arcsin(2*x - 5)

________________________________________________________________________________________

Fricas [A]
time = 0.30, size = 62, normalized size = 0.68 \begin {gather*} -\frac {1}{64} \, {\left (16 \, x^{3} - 120 \, x^{2} + 290 \, x - 225\right )} \sqrt {x - 2} \sqrt {-x + 3} - \frac {3}{128} \, \arctan \left (\frac {{\left (2 \, x - 5\right )} \sqrt {x - 2} \sqrt {-x + 3}}{2 \, {\left (x^{2} - 5 \, x + 6\right )}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3-x)^(3/2)*(-2+x)^(3/2),x, algorithm="fricas")

[Out]

-1/64*(16*x^3 - 120*x^2 + 290*x - 225)*sqrt(x - 2)*sqrt(-x + 3) - 3/128*arctan(1/2*(2*x - 5)*sqrt(x - 2)*sqrt(
-x + 3)/(x^2 - 5*x + 6))

________________________________________________________________________________________

Sympy [A]
time = 12.09, size = 199, normalized size = 2.19 \begin {gather*} \begin {cases} - \frac {3 i \operatorname {acosh}{\left (\sqrt {x - 2} \right )}}{64} - \frac {i \left (x - 2\right )^{\frac {9}{2}}}{4 \sqrt {x - 3}} + \frac {5 i \left (x - 2\right )^{\frac {7}{2}}}{8 \sqrt {x - 3}} - \frac {13 i \left (x - 2\right )^{\frac {5}{2}}}{32 \sqrt {x - 3}} - \frac {i \left (x - 2\right )^{\frac {3}{2}}}{64 \sqrt {x - 3}} + \frac {3 i \sqrt {x - 2}}{64 \sqrt {x - 3}} & \text {for}\: \left |{x - 2}\right | > 1 \\\frac {3 \operatorname {asin}{\left (\sqrt {x - 2} \right )}}{64} + \frac {\left (x - 2\right )^{\frac {9}{2}}}{4 \sqrt {3 - x}} - \frac {5 \left (x - 2\right )^{\frac {7}{2}}}{8 \sqrt {3 - x}} + \frac {13 \left (x - 2\right )^{\frac {5}{2}}}{32 \sqrt {3 - x}} + \frac {\left (x - 2\right )^{\frac {3}{2}}}{64 \sqrt {3 - x}} - \frac {3 \sqrt {x - 2}}{64 \sqrt {3 - x}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3-x)**(3/2)*(-2+x)**(3/2),x)

[Out]

Piecewise((-3*I*acosh(sqrt(x - 2))/64 - I*(x - 2)**(9/2)/(4*sqrt(x - 3)) + 5*I*(x - 2)**(7/2)/(8*sqrt(x - 3))
- 13*I*(x - 2)**(5/2)/(32*sqrt(x - 3)) - I*(x - 2)**(3/2)/(64*sqrt(x - 3)) + 3*I*sqrt(x - 2)/(64*sqrt(x - 3)),
 Abs(x - 2) > 1), (3*asin(sqrt(x - 2))/64 + (x - 2)**(9/2)/(4*sqrt(3 - x)) - 5*(x - 2)**(7/2)/(8*sqrt(3 - x))
+ 13*(x - 2)**(5/2)/(32*sqrt(3 - x)) + (x - 2)**(3/2)/(64*sqrt(3 - x)) - 3*sqrt(x - 2)/(64*sqrt(3 - x)), True)
)

________________________________________________________________________________________

Giac [A]
time = 0.02, size = 275, normalized size = 3.02 \begin {gather*} -2 \left (2 \left (\left (\left (\frac {73}{96}-\frac {1}{16} \sqrt {-x+3} \sqrt {-x+3}\right ) \sqrt {-x+3} \sqrt {-x+3}-\frac {1363}{384}\right ) \sqrt {-x+3} \sqrt {-x+3}+\frac {2093}{256}\right ) \sqrt {-x+3} \sqrt {x-2}+\frac {1363}{128} \arcsin \left (\sqrt {-x+3}\right )\right )+16 \left (2 \left (\left (\frac {1}{12} \sqrt {-x+3} \sqrt {-x+3}-\frac {37}{48}\right ) \sqrt {-x+3} \sqrt {-x+3}+\frac {83}{32}\right ) \sqrt {-x+3} \sqrt {x-2}+\frac {61}{16} \arcsin \left (\sqrt {-x+3}\right )\right )-42 \left (2 \left (\frac {13}{16}-\frac {1}{8} \sqrt {-x+3} \sqrt {-x+3}\right ) \sqrt {-x+3} \sqrt {x-2}+\frac {11}{8} \arcsin \left (\sqrt {-x+3}\right )\right )+36 \left (\frac {1}{2} \sqrt {-x+3} \sqrt {x-2}+\frac {\arcsin \left (\sqrt {-x+3}\right )}{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3-x)^(3/2)*(-2+x)^(3/2),x)

[Out]

-1/192*(2*(4*(6*x + 55)*(x - 3) + 1363)*(x - 3) + 6279)*sqrt(x - 2)*sqrt(-x + 3) + 1/3*(2*(4*x + 25)*(x - 3) +
 249)*sqrt(x - 2)*sqrt(-x + 3) - 21/4*(2*x + 7)*sqrt(x - 2)*sqrt(-x + 3) + 18*sqrt(x - 2)*sqrt(-x + 3) - 3/64*
arcsin(sqrt(-x + 3))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (x-2\right )}^{3/2}\,{\left (3-x\right )}^{3/2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x - 2)^(3/2)*(3 - x)^(3/2),x)

[Out]

int((x - 2)^(3/2)*(3 - x)^(3/2), x)

________________________________________________________________________________________